﻿package com.pandemicode.framework.smtp.mailer {
	/**
	* @author Mike Lawrence
	*/
	public class EmailAddress {
		public var name:String;
		public var email:String;
		
		public function get formatted():String { return ((this.name == null) ? "" : this.name + " ") + this.formattedWithoutName; }
		public function get formattedWithoutName():String { return "<" + this.email + ">"; }
		
		public function EmailAddress(name:String = null, email:String = null) {
			this.name = name;
			this.email = email;
		}
		
		public function toString():String {
			return this.formatted;
		}
	}
}
